package com.biz.service.api;

import com.alibaba.fastjson.JSON;
import com.biz.conf.Global;
import com.biz.model.Hmodel.TorderMain;
import com.biz.model.Pmodel.api.BaseUser;
import com.biz.model.Pmodel.api.OrderMain90;
import com.biz.model.Pmodel.api.Shop;
import com.biz.service.base.BaseServiceImpl;
import com.framework.dao.mdao.DaoSupport;
import com.framework.utils.URLConectionUtil;
import net.sf.json.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by lzq on 2017/2/4.
 */

@Service("baseUserService")
public class BaseUserServiceImpl extends BaseServiceImpl implements BaseUserServiceI {
    @Resource(name = "daoSupport")
    private DaoSupport dao;

    public List<BaseUser> queryBaseUserByOnlyCode(String only_code) throws Exception
    {
        return (List<BaseUser>) dao.findForList("BaseUserDao.queryBaseUserByOnlyCode", only_code);
    }
    public List<BaseUser> queryBaseUserByPhone(String phone) throws Exception
    {
        return (List<BaseUser>) dao.findForList("BaseUserDao.queryBaseUserByPhone", phone);
    }
    public String getSysUserIdByOpenId(String openid)throws Exception
    {
        return (String) dao.findForObject("BaseUserDao.getSysUserIdByOpenId", openid);
    }
    public Double getCoin_90ByTUserId(String id)throws Exception
    {
        return (Double) dao.findForObject("BaseUserDao.getCoin_90ByTUserId", id);
    }
}
